#ifndef FOVCELL_H
#define FOVCELL_H

#include <QGraphicsItem >
#include <QObject>

class FovCell :public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    FovCell(int regionRow,int regionCol,int fovRow,int fovCol,QSize fovSize, QObject  *parent = nullptr);
    QRectF boundingRect() const override;

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)override;

    void setResult(int result){this->result=result;}

signals:
    void fovClicked(int regionRow,int regionCol,int fovRow,int fovCol);

protected:
    void mousePressEvent(QGraphicsSceneMouseEvent*)override;

private:
    int itemRow;
    int itemCol;
    int fovRow;
    int fovCol;

    QSize size;
    QColor color;

    int result;
};

#endif // FOVCELL_H
